<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="leader">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_team('team')}</ul>
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
				<!--{if $team['id']}-->
					<h2>编辑项目</h2>
					<ul class="filter">${current_manageteam('editapi', $team['id'])}</ul>
				<!--{else}-->
					<h2>新建项目</h2>
				<!--{/if}-->
				</div>
                <div class="sect">
				<form id="-user-form" method="post" action="/manage/team/editapi.php?id={$team['id']}" enctype="multipart/form-data" class="validator">
					<input type="hidden" name="id" value="{$team['id']}" />
					<div class="wholetip clear"><h2>当前项目：<a target="_blank" href="/team.php?id={$team['id']}">{$team['title']}</a></h2></div>
					<div class="wholetip clear"><h3>1、百度团购导航</h3></div>
					<div class="field">
						<label>分类</label>
						<select name="cate_api_baidu_first" id="cate_api_baidu_first" class="f-input" style="width:160px;" onchange="change_baidu(this.value);">
						<option value="" <!--{if $cate_baidu_arr[0] == ""}-->selected<!--{/if}--> >---请选择一级分类---</option>
						<!--${
							require_once(dirname(dirname(dirname(__FILE__))).'/include/configure/navigation.php');
							foreach($baidu as $key=>$val){
								if($cate_baidu_arr[0] == $key){
									echo "<option selected value=\"$key\">$key</option>";
								}else{
									echo "<option value=\"$key\">$key</option>";
								}
							}
						}-->
						</select>
						<script type="text/javascript">
						<!--
						    function change_baidu(first){
								first=encodeURI(first);
								return !X.get(WEB_ROOT + '/manage/team/ajax.php?action=baidu&first='+first);
							}
                            function change_baidu2(second){
                                first = $("#cate_api_baidu_first").val();
                                first = encodeURI(first);
                                second = encodeURI(second);
                                return !X.get(WEB_ROOT + '/manage/team/ajax.php?action=baidu2&second='+second+'&first='+first);
                            }
						//-->
						</script>
						<select id="cate_api_baidu_second" onchange="change_baidu2(this.value);" name="cate_api_baidu_second" class="f-input" style="width:160px;"  datatype="require" require="true">
						<option value="">---请选择二级分类---</option>
						<!--${
							require_once(dirname(dirname(dirname(__FILE__))).'/include/configure/navigation.php');
							$cate_baidu_key = $cate_baidu_arr[0];
							$aa = $baidu[$cate_baidu_key];
							foreach($aa as $key=>$val){
								if('网上购物' == $cate_baidu_arr[0] || '餐饮美食' == $cate_baidu_arr[0] || '酒店旅游' == $cate_baidu_arr[0]){
								    if($cate_baidu_arr[1] == $key){
    									echo "<option selected value=\"$key\">$key</option>";
    								}else{
    									echo "<option value=\"$key\">$key</option>";
    								}
								}else{
								    if($cate_baidu_arr[1] == $val){
    									echo "<option selected value=\"$val\">$val</option>";
    								}else{
    									echo "<option value=\"$val\">$val</option>";
    								}
								}
							}
						}-->
						</select>
                        <div id="cate_api_baidu_second_select">
                            <!--${
                                if($cate_baidu_arr[2]){
                                    foreach($baidu[$cate_baidu_arr[0]][$cate_baidu_arr[1]] AS $key=>$val){
                                        if($cate_baidu_arr[2] == $val){
                                            $v[] = '<option selected value='.$val.'>'.$val.'</option>';
                                        }else{
                                            $v[] = '<option value='.$val.'>'.$val.'</option>';
                                        }
                                    }
                                    $v = join('', $v);
                                    echo "<select name=\"cate_api_baidu_third\" class=\"f-input\" style=\"width:120px\">".$v."</select>";
                                }
                            }-->
                        </div>
					</div>

					<div class="wholetip clear"><h3>2、360团购导航</h3></div>
					<div class="field">
						<label>分类</label>
						<select name="cate_api_360_first" class="f-input" style="width:160px;" onchange="change_360(this.value)">
						<option value="">---请选择一级分类---</option>
						<!--${
							require_once(dirname(dirname(dirname(__FILE__))).'/include/configure/navigation.php');
							foreach($tuan360 as $key=>$val){
								if($cate_360_arr[0] == $key){
									echo "<option selected value=\"$key\">$key</option>";
								}else{
									echo "<option value=\"$key\">$key</option>";
								}
							}
						}-->
						</select>
						<script type="text/javascript">
						<!--
						    function change_360(first){
								first=encodeURI(first);
								return !X.get(WEB_ROOT + '/manage/team/ajax.php?action=tuan360&first='+first);
							}
						//-->
						</script>
						<label>二级分类</label>
						<div id="cate_api_360_second">
							<!--${
							require_once(dirname(dirname(dirname(__FILE__))).'/include/configure/navigation.php');
							$cate_360_key = $cate_360_arr[0];
							$bb = $tuan360[$cate_360_key];
							foreach($bb as $key=>$val){
								if(strpos($cate_360_arr[1], $val) !== false){
									echo "<input checked type=\"checkbox\" name=\"cate_api_360_second[]\" id=\"360_$key\" value=\"$val\" /><label style=\"width:40px;float:none\" for=\"360_$key\">$val</label>";
								}else{
									echo "<input type=\"checkbox\" name=\"cate_api_360_second[]\" id=\"360_$key\" value=\"$val\" /><label style=\"width:40px;float:none\" for=\"360_$key\">$val</label>";
								}
							}
							}-->
						</div>
					</div>

					<div class="wholetip clear"><h3>3、团800团购导航</h3></div>
					<div class="field">
						<label>分类</label>
						<!--${
							require_once(dirname(dirname(dirname(__FILE__))).'/include/configure/navigation.php');
							foreach($tuan800 as $key=>$val){
								if(strpos($cate_tuan800_arr[0], $val) !== false){
									echo "<input checked type=\"checkbox\" name=\"cate_api_tuan800[]\" id=\"tuan800_$key\" value=\"$val\" /><label style=\"width:40px;float:none\" for=\"tuan800_$key\">$val</label>";
								}else{
									echo "<input type=\"checkbox\" name=\"cate_api_tuan800[]\" id=\"tuan800_$key\" value=\"$val\" /><label style=\"width:40px;float:none\" for=\"tuan800_$key\">$val</label>";
								}
								
							}
						}-->
					</div>
					<input type="submit" value="好了，提交" name="commit" id="leader-submit" class="formbutton" style="margin:10px 0 0 120px;"/>
				</form>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>
<div id="sidebar">
</div>

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include manage_footer}-->
